﻿<%@ Page Title="用户注册" Language="C#" MasterPageFile="~/Home/Public/Home.Master" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="VIKI.Web.Home.Login.Register" %>

<asp:Content runat="server" ID="HeadContent" ContentPlaceHolderID="HeadContent">
    <style>
        .field-validation-error {
            line-height: 45px;
            color: red;
        }
        .register-usertype {
            width:190px;
            height:32px;
        }
    </style>
    <link rel="stylesheet" type="text/css" href='<%=ResolveUrl("~/Home/Resources/Css/home-v=20131213103.css")%>' />
    <link rel="stylesheet" type="text/css" href='<%=ResolveUrl("~/Home/Resources/Css/page_new-v=20131213103.css")%>' />
    <script>
        function CheckEmail() {

        }
    </script>
</asp:Content>

<asp:Content runat="server" ID="MainContent" ContentPlaceHolderID="MainContent">
    <form id="RegisterForm" runat="server">
        <asp:ScriptManager runat="server" ID="ScriptManager"></asp:ScriptManager>
        <div class="conbox_register">
            <div class="lhdl_3">
                <asp:UpdatePanel runat="server" ID="RegisterPanel" UpdateMode="Conditional">
                    <ContentTemplate>
                        <ul class="loginbox02">
                            <li class="ljdl">已有有Viki帐号？<a href="~/Home/Login/Login.aspx" target="_blank" title="denglu" runat="server">立即登陆</a>
                            </li>
                            <li>
                                <asp:Label runat="server" AssociatedControlID="Email"><strong style="color:red;">※</strong>邮箱：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</asp:Label>
                                <asp:TextBox runat="server" ID="Email" CssClass="logininput02" />
                                <asp:RequiredFieldValidator runat="server" ControlToValidate="Email"
                                    CssClass="field-validation-error" ErrorMessage="请输入邮箱！" Display="Dynamic" />
                                <asp:RegularExpressionValidator runat="server" ControlToValidate="Email"
                                    CssClass="field-validation-error" ErrorMessage="邮箱格式错误" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>
                                <asp:CustomValidator runat="server" ControlToValidate="Email"
                                    CssClass="field-validation-error" ErrorMessage="该邮箱已注册" ClientValidationFunction="CheckEmail();" Display="Dynamic" />

                            </li>
                            <li>
                                <asp:Label runat="server" AssociatedControlID="UserName"><strong style="color:red;">※</strong>英文昵称：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</asp:Label>
                                <asp:TextBox runat="server" ID="UserName" CssClass="logininput02" />
                                <asp:RequiredFieldValidator runat="server" ControlToValidate="UserName"
                                    CssClass="field-validation-error" ErrorMessage="请输入英文名称！" Display="Dynamic" />
                                <asp:RegularExpressionValidator runat="server" ControlToValidate="UserName"
                                    CssClass="field-validation-error" ErrorMessage="昵称为4-16位字母、数字和下划线的组合" ValidationExpression="\w{4,16}$" Display="Dynamic"></asp:RegularExpressionValidator>
                            </li>
                            <li>
                                <asp:Label runat="server" AssociatedControlID="Password"><strong style="color:red;">※</strong>密码：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</asp:Label>
                                <asp:TextBox runat="server" ID="Password" CssClass="logininput02" TextMode="Password" />
                                <asp:RequiredFieldValidator runat="server" ControlToValidate="Password" CssClass="field-validation-error" ErrorMessage="请输入密码！" Display="Dynamic" />
                                <asp:RegularExpressionValidator runat="server" ControlToValidate="Password"
                                    CssClass="field-validation-error" ErrorMessage="密码为8-16位字母、数字和下划线的组合" ValidationExpression="\w{8,16}$"></asp:RegularExpressionValidator>
                            </li>
                            <li>
                                <asp:Label runat="server" AssociatedControlID="ConfirmPassword"><strong style="color:red;">※</strong>确认密码：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</asp:Label>
                                <asp:TextBox runat="server" ID="ConfirmPassword" CssClass="logininput02" TextMode="Password" />
                                <asp:RequiredFieldValidator runat="server" ControlToValidate="ConfirmPassword" CssClass="field-validation-error" ErrorMessage="请确认密码！" Display="Dynamic" />
                                <asp:CompareValidator runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword" CssClass="field-validation-error" Display="Dynamic" ErrorMessage="两次输入的密码不相同！" />
                            </li>
                            <li>
                                <asp:Label runat="server" AssociatedControlID="Tel"><strong style="color:red;">※</strong>用户类型：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</asp:Label>
                                <asp:DropDownList runat="server" ID="UserType" CssClass="register-usertype" />
                            </li>
                            <li>
                                <asp:Label runat="server" AssociatedControlID="Tel"><strong style="color:red;">※</strong>联系方式：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</asp:Label>
                                <asp:TextBox runat="server" ID="Tel" CssClass="logininput02" />
                                <asp:RequiredFieldValidator runat="server" ControlToValidate="Tel" CssClass="field-validation-error" ErrorMessage="请输入联系方式！" Display="Dynamic" />
                                <asp:RegularExpressionValidator runat="server" ControlToValidate="Tel"
                                    CssClass="field-validation-error" ErrorMessage="联系方式格式不正确" ValidationExpression="^[1][3-8]\d{9}$" Display="Dynamic"></asp:RegularExpressionValidator>
                            </li>
                            <li>
                                <asp:Label runat="server">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</asp:Label>
                                <asp:Button runat="server" CommandName="MoveNext" CssClass="btnreg2" OnClick="RegisterUser" />
                            </li>
                        </ul>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
        </div>
    </form>
</asp:Content>
